> PHP restore_exception_handler() 函数

PHP restore_exception_handler() 函数

定义和用法

restore_exception_handler() 函数恢复之前的异常处理程序,该程序是由 set_exception_handler() 函数改变的。

该函数永远返回 true。

语法

restore_exception_handler()

提示和注释

提示:之前的异常处理程序可能是在异常处理程序或用户自定义函数中构建的。

例子

<?php
restore_exception_handler();

throw new Exception('Uncaught Exception occured');
?>

输出:

Fatal error: Uncaught exception 'Exception' with message 
'Uncaught Exception occured' in C:webfolder	est.php:4 
Stack trace: #0 {main} thrown in C:webfolder	est.php on line 4
参考手册

W3c0.com 提供的内容仅用于培训。我们不保证内容的正确性。通过使用本站内容随之而来的风险与本站无关。W3c0 简体中文版的所有内容仅供测试,对任何法律问题及风险不承担任何责任。 当使用本站时,代表您已接受了本站的使用条款和隐私条款。版权所有,保留一切权利。 鲁ICP备15022115号